It is known to enlarge images, such as for example, when zooming in on a region of an image to make it easier to see the detail within the region. In doing so, it is desirable for the image content of the enlarged image to be as sharp, or sharper than, that of the original image. In consideration thereof, an enlargement is not generated by merely magnifying the original image, because the sharpness of the enlarged image would be recognized to be lower than the sharpness of the original image. Rather an enlargement is typically formed from a combination of original image data and interpolated image data.
Various methods have been proposed for generating interpolated image data. Nearest neighbor and linear interpolation of first, second or third order are simple and popular methods. Conceptually, these methods typically have two stages: (1) fit an interpolating function to the data points of the original image. (2) evaluate the interpolating function at one or more points between the data points of the original image. Linear interpolation can be viewed as using a weighted average wherein the greatest weight is given to the pixels nearest the pixel being interpolated. In cases where the data points are disposed in a line, the interpolation is sometimes said to be carried out along the line, or in a direction of that line. However the above methods often introduce artifacts that blur and/or introduce rings around edges, i.e., boundaries, such as for example, between light and dark regions in the image. This is particularly true in cases where the pixel to be interpolated is near an edge and the interpolation is not carried out parallel to the edge.
Other interpolation methods include improved B-spline methods, Bayesian methods, segmentation, and frequency space extrapolation. Still further methods include non-linear interpolation, e.g., median interpolation. Median interpolation is frequently used for text images, which are typically bi-level (binary), i.e., having exactly two levels of greyness (typically black and white). When dealing with bi-level text images, it is generally desirable to preserve the bi-level quality of the images. Trying to use linear interpolation on a bi-level text image is difficult at best, and at worst, results in blurring of the edges in the image.
Adaptive interpolation methods have also been developed. Adaptive interpolation methods analyze the image content of portions of an image, and base the interpolation for each portion upon the image content of the portion.
Adaptive interpolation methods that select and/or adapt one or more types of linear interpolation to each portion of an image are known. However, the effectiveness of these adaptive methods depends on their ability to select and/or adopt linear interpolation methods to each situation that may arise.
It has been observed that even if an image is not entirely bi-level, there are often advantages to using non linear interpolation for some portion of the image. For example, the image may have one or more portions that are bi-level. To help keep the image sharp, it may be desirable to detect such portions and interpolate therein using non linear interpolation rather than linear interpolation. It should be understood that a bi-level image need not be a text image. As another non limiting example, it may be desirable to use non-linear interpolation rather than linear interpolation for some portions that contain edges, for example, where the portion has an edge and the direction of the edge is either unidentified or off-line from a direction that would otherwise be used to linearly interpolate.
Thus, one object of one aspect of the present invention is to provide an adaptive interpolation apparatus and method that selects between linear and non-linear interpolation.
In accordance with a first aspect of the present invention, a method and an apparatus for processing an image classifies the image content of a portion of the image, and in response thereto, selects between linear and non-linear interpolation methods to interpolate data points for the portion of the image.
According to one embodiment of the invention, the linear interpolation comprises polynomial interpolation, preferably of third order, i.e., cubic.
According to another embodiment of the invention, the non-linear interpolation comprises medial and/or modal interpolation.
According to another embodiment of the invention, the method and apparatus determines whether the image content of the portion of the image is bi-level, i.e., binary, and if so, selects non-linear interpolation.
According to another embodiment of the invention, the method and apparatus determines whether the image content of the portion of the image includes an edge and lacks a specified measure of correlation along a line, and if so, selects non-linear interpolation to interpolate a value of a pixel disposed on the line.
The adaptive method employed by the present invention may help to keep the image sharp thereby helping to retain the detail of the image. The invention may also help to avoid introduction of unwanted artifacts. While the invention does not require specialized hardware, an embodiment with specialized hardware could speed execution. Furthermore, because the adaptive method of the present invention has the ability to select non-linear interpolation for a portion of the image, the types of linear interpolation employed by the adaptive need not be as complex (and therefore may be faster and easier to execute than otherwise be required), although this depends on the embodiment and is not intended as a limitation of the present invention in any way, shape or form.
In another embodiment, the method and apparatus are used in an image enlarging system. The image enlarging system uses non-linear interpolation in portions of an image where the image content is bi-level and in portions where image content includes an edge but there is no identified edge direction or path of isobrightness. The image enlarging system uses linear interpolation in portions where the image content does not include an identified edge and in portions where there is an identified edge in combination with an identified edge direction or a path of isobrightness. The present invention may of course also be used in other embodiments of image enlarging systems.
In some embodiments, the method and apparatus may be used in digital cameras, printers, and monitors.
In another embodiment, the method and apparatus may be used to process video frames.
In another embodiment, the method and apparatus may be used for upsampling in a image compression system having hierarchical coding.
In a second aspect of the present invention, a method and apparatus for use in classifying the image content of a portion of an image calculates a reference value from pixel values for a portion of an image and generates data indicative of which pixel values are greater than the reference value and which pixel values are less than the reference value.
This aspect of the invention may be used in conjunction with the first aspect of the invention, but is not limited to such.
These and other objects, features and advantages of the present invention will be apparent in view of the drawings, description and claims hereinbelow.